package com.zr.util;

/**
 * Created by 非常狂躁的猪 on 2019/12/28.
 */
public enum StatusEnum {
    TIJIAO("已提交",0),BAOCUN("已保存",1),HESHEN("已核审",2),ZUOFEI("已作废",3);
    private String name;
    private Integer value;

    StatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    //普通方法,通过value获取名称
    public static String getName(Integer value){
        for (StatusEnum c:StatusEnum.values()){
            if (c.getValue() == value ){
                return c.name();
            }
        }
        return null;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
